package com.example.pda.ui.main;

import com.example.pda.common.BaseViewModel;
import com.example.pda.data.model.MainCard;

import java.util.ArrayList;
import java.util.List;

import androidx.lifecycle.MutableLiveData;

public class MainViewModel extends BaseViewModel {

    private final MutableLiveData<List<MainCard>> cardResult = new MutableLiveData<>();

    public MutableLiveData<List<MainCard>> getCardResult() {
        return cardResult;
    }

    public void loadMainCards() {
        // 23=到货单
        // 4455=材料出库单
        // 5X=调拨订单
        List<MainCard> beans = new ArrayList<>();
        beans.add(new MainCard("采购入库", "23"));
        beans.add(new MainCard("材料出库", "4455"));
        beans.add(new MainCard("调拨出库", "5X"));
        beans.add(new MainCard("采购订单查询", "order"));
        beans.add(new MainCard("实时库存", "store"));
        beans.add(new MainCard("清除缓存", "1"));
        beans.add(new MainCard("系统设置", "1"));
        beans.add(new MainCard("退出", "1"));
        cardResult.setValue(beans);
    }
}